<script type="text/javascript">
   $(function(){
       $("#set_time_out").click(function(){
            var bValid=true;
            bValid = bValid && checkRegexp_num($("#time_out"), /^[1-9][0-9]*$/i, "超时时长的范围在1-1000分钟之间"); 
            bValid = bValid && checkCapacity($("#time_out"),"超时时长",1,1000,"超时时长的范围在1-1000分钟之间");
            if(bValid){
               $(this).attr("disabled","disabled");
                var expired_time = $.trim($("#time_out").val());
               $.post('/set_expired_time',{'expired_time':expired_time}, function(data){
			if (data.substring(0, 4) == 'SUCC'){
                            sessionTimeout = parseInt(expired_time) * 60000;
                            resetTime();
          	            $("#set_time_out").removeAttr("disabled");		       
          	            $(".error_tip").text("设置完成").css({"display":"block","color":'#000'});             		       
                        }else{
          	            $(".error_tip").text(data).css({"display":"block","color":'#000'});    
          	             $("#set_time_out").removeAttr("disabled");         		       
                        }
               })
         }
       })
        $(".contentpanel").find(".panel:first").css({'height':$(window).height()-73});
       if($(window).height()<750){
           $(".panel-h").css({'height':550});
    }
   })
</script>
<div class="panel panel-default panel-h">
    <div class="panel-body">
        <div class="page conf_div" style="overflow:auto;">
	 <div class="node_content">
	  		<fieldset style="vertical-align:middle;height:auto;margin-left:20px;":>
	    			<div class="conf_des">要求超时时长在1-1000分钟之间</div>
            <div class="Time_adjust">
                <div class="error_tip"></div>
	           <input type="text" id="time_out" value="{{expired_time}}" />&nbsp;&nbsp;[['config minute'|translate]]
	           <input type="button" value="[['config Set up'|translate]]" class="button button_gray" id="set_time_out" style="margin-left:30px;"/>
            </div>
	   	 </fieldset>
	 </div>
	<!--<div class="node_content">
	       	  <fieldset style="vertical-align:middle;">
	 	       <legend >事件保存天数</legend> 
	 	      <div class="conf_des">（要求事件保存天数在7-100天）</div>
	 	      <div class="error_tip"></div>
	        <input type="text"  />天<input type="button" value="设置" class="button button_gray" style="margin-left:30px;"/>
	       	  </fieldset>
	      </div>-->
        </div>  
</div> <!-- panel-body -->
</div> <!-- panel-default -->


